1. Field of the Invention
The present invention relates to an apparatus and method for coordinate conversion, and more particularly, to an apparatus and method for converting spatial resolution of a digital image by an inverse-mapping technique.
2. Discussion of the Related Art
There are various formats for expressing spatial resolution of an image, such as, a quarter common intermediate format (QCIF), a quarter video graphics array (QCIF) format, a source input format (SIF), a common intermediate format (CIF), a national television system committee (NTSC) format, a phase alternation line (PAL) format, a 480P format, a 720P format, a 1080I format, and the like, and a display device supports various-resolution outputs. Accordingly, so as to be able to display input images of various formats on a display device of fixed resolution, it is essential to convert spatial resolution of an input image.
In general, an inverse-mapping method, which re-maps coordinates of an output image to coordinates of an input image, is used for converting spatial resolution of an image.
FIG. 1 is a diagram illustrating a general inverse-mapping method.
Referring to FIG. 1, in case where an input image having a plurality of input image coordinates 2 is displayed by display devices of different formats, output image coordinates 4 are additionally generated by spatial resolution conversion according to a change in format.
At this time, since the output image coordinates 4 are mapped not to one input image coordinates 2 but to a plurality of input image coordinates 2, a pixel value of the output image coordinates 4 is determined by using pixel values of peripheral input image coordinates 2.
Here, the method of obtaining the output image coordinates mapped to the input image coordinates is called a re-sampling method. Also, the method of determining the pixel value of the output image coordinates by using the pixel values of the peripheral input image coordinates is called an interpolation method.
Accordingly, the necessary number of peripheral pixels is determined according to the interpolation method.
U.S. Pat. No. 5,835,150 titled as “Sampling rate conversion using digital differential analyzers” describes a method of performing the re-sampling and the interpolation by using digital differential analyzers (DDA), which is illustrated in FIG. 2 and will now be described with reference to FIG. 2.
Referring to FIG. 2, a DDA controller includes a 11-bit ratio register 10 for obtaining a 11-bit ratio through division of an input image size by an output image size and storing the obtained 11-bit ratio, a 12-bit adder 20, a 12-bit status register 30 for accumulating increment of the 11-bit ratio register 10 through addition by the 12-bit adder and storing the increment, and a decode logic unit 40 for controlling an FIR coefficient selection operation and an input shifting operation according to spatial resolution by using an accumulated image size outputted from the 12-bit status register 30.
In the above coordinate conversion method, spatial resolution is converted by using an accumulation value obtained by adding an increment value (11-bit ration register 10) and an accumulated value (12-bit status register 30) per output pixel.
As shown in FIG. 3, input samples are shifted by using an integer part of the accumulation value, a decimal part of the accumulation value denotes a position between the input samples, from which an output pixel should be re-sampled.
Here, the decimal part denotes “Sx” or “Sy” in FIG. 1, a coefficient of an interpolation filter is selected by using 2 digits below a decimal point.
In the above-stated inverse mapping method, output coordinates are increased by an I/O ratio of an input size to an output size. In general, the I/O ratio is not a finite value.
Although an increment value has a precision of 1/1024, a re-sampling position error of 1/2048 per output pixel is inevitably generated because the I/O ratio is not a finite value. An accumulation position error about the total output image is expressed by Equation 1 below.
[Equation 1](accumulation position error)=(output image size)×( 1/2048)  (1)
Such accumulation position error causes a deterioration of picture quality and disturbs (or prevents) sampling from being performed at an accurate sample position.
The accumulation position error is caused by storage of the increment value (i.e., the I/O ratio) in a finite-sized register. Accordingly, if the above problem is solved, a coordinate conversion device not having the accumulation position error may be embodied.